home *** CD-ROM | disk | FTP | other *** search
- #define INCL_PM
- #include <os2.h>
-
- #define NEWCLASSNAME "NewClass"
-
- MRESULT EXPENTRY windowFunction (HWND hwnd,ULONG msg,
- MPARAM mp1,MPARAM mp2)
- {
- switch (msg) {
- case WM_ERASEBACKGROUND:
- return (MRESULT) FALSE;
- default:
- return WinDefWindowProc (hwnd,msg,mp1,mp2);
- }
- }
-
- main ()
- {
- HAB hab;
- HMQ hmq;
- QMSG qmsg;
- HWND mainWindow;
- HWND clientWindow;
- ULONG createFlags;
-
- hab = WinInitialize (0);
- hmq = WinCreateMsgQueue (hab,0);
-
- WinRegisterClass (hab,NEWCLASSNAME,windowFunction,0L,0);
-
- createFlags = FCF_SYSMENU | FCF_TITLEBAR | FCF_MINMAX |
- FCF_SIZEBORDER | FCF_SHELLPOSITION |
- FCF_TASKLIST;
-
- mainWindow = WinCreateStdWindow (HWND_DESKTOP,
- WS_VISIBLE,
- &createFlags,
- (PSZ) NEWCLASSNAME,
- (PSZ) "",
- 0L,
- NULLHANDLE,
- 1000,
- &clientWindow);
-
- while (WinGetMsg (hab,&qmsg,(HWND) NULL,0,0))
- WinDispatchMsg (hab,&qmsg);
-
- WinDestroyWindow (mainWindow);
-
- WinDestroyMsgQueue (hmq);
- WinTerminate (hab);
- }
-